
#include "net.h"


static pthread_t  net_thread;


void* net_task(void *arg)
{
	struct timeval timer;	

	while(1)
	{
		usleep(1000);
		//************************************************************************

		timer.tv_sec  = 60;
		timer.tv_usec = 0;

		switch(select(0, NULL, NULL, NULL, &timer)) {
		case -1:  
			log_e("Error!\n");
			break;
		case 0: 
			break;
		default:break;
		}
		//************************************************************************
#if 1
		//net_sunning_servr_time();

		//net_baidu_server();

		//net_ku138_servr_time();
#endif
		//************************************************************************


	}

}




int net_init(void)
{
	int ret = -1;
	log_i("net init.\n");

	net_server_init();

	ret=pthread_create(&net_thread, NULL, net_task, NULL);
	if(ret != 0){
		log_e("thread error=%s\n",strerror(ret));
	}



	return 0;
}


int net_deinit(void)
{
	log_i("net exit.\n");






	return 0;
}



